<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户转账</title>
    <link href="\student\static\style\css\bootstrap.min.css" rel="stylesheet">
    <link href="\student\static\style\css\site.min.css" rel="stylesheet">
    <style>
        .container  .row .col-lg-4 img{ display: block; margin-left: auto; margin-right: auto; }
        .container .row .col-lg-4 h3,p{ text-align: center; }
        .row .col-lg-4 .button{ width: 360px; margin-left: 150px; margin-bottom: 10px;}
    </style>
    <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
    </script>
    <script>
        $(document).ready(
                function()
                {
                    var zhuangtai = "<?php echo $_SESSION['name'] ?>";
                    if (zhuangtai) {
                        $("#zhuce").hide();
                        $("#denglu").hide();
                    }
                    else
                    {
                        $("#zhuce").show();
                        $("#denglu").show();
                    }
                });
    </script>
</head>

<body>
    <!--导航栏-->
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <a class="navbar-brand hidden-sm" href="index.html">慕课网</a>
            </div>
            <div class="navbar-header">
                <a class="navbar-brand hidden-sm" href="index.html"><?php echo $_SESSION['name'];?>,欢迎您！</a>
            </div>
        </div>
    </div>
    <!--导航栏结束-->
    <!--巨幕-->
    <div class="jumbotron masthead">
        <div class="container">
          <h1>学生转账管理系统</h1>
          <h2>实现学生转账功能</h2>
            <p class="masthead-button-links">
                <form class="form-inline" action="/student/index.php/zhucecontroller/sousuo" method="get">
                    <div class="form-group">
                        <input type="text" class="form-control" id="exampleInputName2" placeholder="输入搜索内容" name="sousuo" value="">
                        <button class="btn btn-default" type="submit">搜索</button>
                        <a id='zhuce' href="/student/index.php/zhucecontroller/zhuce"><button type="button" class="btn btn-primary btn-default" data-toggle="modal">  注册  </button></a>
                        <a id='denglu' href="/student/index.php/zhucecontroller/denglu"><button type="button" class="btn btn-primary btn-default" data-toggle="modal">  登录  </button></a>
                        <a href="/student/index.php/zhucecontroller/tuichu"><button type="button" class="btn btn-primary btn-default" data-toggle="modal">  退出  </button></a>
                    </div>
                </form>
            </p>
        </div>
    </div>
    <!--巨幕结束-->
    <!-- 模态框 -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <form class="form-inline" action="/student/index.php/zhucecontroller/zhuanzhang" method="post" enctype="multipart/form-data">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">转账</h4>
                    </div>
                    <div class="modal-body">
                        <p>
                          收款人：
                          <select name="renming" class="form-control">
                            <?php
                        $mysqli = new mysqli('localhost','root','root','student');
                        if($mysqli)
                            {                                                            //我写成mvc的模式老不成功？
                                   //  echo '连接成功';                                  //问下老师加入我把这一块的代码换成这一句就不行了，是什么原因
                                                                                        // while( $jieguoq =$_SESSION['resultq']->fetch_array()
                                 }
                              $result = $mysqli->query("select * from student_xinxi");
                              while( $jieguoq = $result->fetch_array())

                              {
                              ?>

                             <option value="<?php echo $jieguoq['xingming']; ?>"><?php echo $jieguoq['xingming']; ?></option>

                              <?php
                         }
                         ?>

                          </select>
                        </p>
                        <br />
                        <p>转账金额：<input type="text" class="form-control" id="exampleInputEmail1"  name="jine" placeholder="请输入数字"></p>
                    </div>
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary" name="submit" id="submit" onclick="show(this)">确认转账</button>
                        <button type="reset" class="btn btn-default">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!--模态框结束-->
    <div class="container projects">
        <div class="projects-header page-header">
            <h2>用户展示</h2>
            <p>将用户信息展示在页面中</p>
        </div>
        <!--信息展示-->
        <div class="row">
            <?php

           while( $jieguo = $_SESSION['result']->fetch_array())
            {
            ?>
            <div class="col-lg-4">
                <img class="img-circle" src="/student/static/upload/12.jpg" alt="" width="140" height="140">
                <h3><?php echo $jieguo['xingming']; ?></h3>
                <p> <?php echo $jieguo['jianjie']; ?> </p>
                <div class="button">
                  <button type="button" class="btn btn-primary btn-default" data-toggle="modal" id="<?php echo $jieguo['xingming']; ?>" data-target="#myModal">  转账  </button>
                </div>
            </div>
          <?php
          }
          ?>

        </div>
    </div>
    <footer class="footer  container">
        <div class="row footer-bottom">
            <ul class="list-inline text-center">
                <h4><a href="http://class.imooc.com" target="_blank">class.imooc.com</a> | 慕课网</h4>
            </ul>
        </div>
    </footer>
    <script src="\student\static\style\js\jquery.min.js"></script>
    <script src="\student\static\style\js\bootstrap.min.js"></script>
</body>

</html>
